<B:UIVKKOPF x:Class="WPFExcelReport.USJHVK04"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:B="clr-namespace:WPFExcelReport;assembly=TVKKOPF"              
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:KA="clr-namespace:WPFExcelReport;assembly=TKDANSP" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=THRSTAMM"  
                    xmlns:VL="clr-namespace:WPFExcelReport;assembly=TVERSART"  
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS"   
                    xmlns:VKD="clr-namespace:WPFExcelReport;assembly=TVKADR"   
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"
                    xmlns:KV="clr-namespace:WPFExcelReport;assembly=TKUNDVER" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    FontSize="14"
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <B:UIVKKOPF.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:M2YD x:Key="M2YD"/>
        <ucd:Divideby10000 x:Key="dw"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </B:UIVKKOPF.Resources>
    <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" 
              IsEnabled="{Binding IsInactive,ElementName=TV,Converter={StaticResource not}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Margin="0,5,0,0" Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="2*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0"  Margin="5,0,0,0"  VerticalAlignment="Top" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=类型:}}"/>
                <SD:K8884  Grid.Column="2" MaxWidth="60"
                               Name="c84"
                                EXAUF="{Binding AUFART,ElementName=TV}"/>

            </Grid>
            <Grid Grid.Column="1"  Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=申购单:}}" ></TextBlock>
                <ex:TXT72 MaxLength="15" Grid.Column="1" Text="{Binding VKKBESTNR,Converter={StaticResource gb2312}}" 
                              Width="150" />
            </Grid> 
            <Grid Grid.Column="3" Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=贸易方式:}}"></TextBlock>
                <SD:TSSD0241 Grid.Column="1"  Name="c0241"
                                 IsEdit="{Binding IsEdit,ElementName=TV}" 
                                 KEY="{Binding LIEFBED,ElementName=TV}" 
                                 LANG="V" 
                                 EXAUF="{Binding LIEFBED,ElementName=TV}"
                                  />
            </Grid>
            <Grid Grid.Column="4" Margin="10,0,0,0" Name="ZoneExt" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0"  Text="{Binding Source={Localization:Translate Word=联系人:}}"></TextBlock>
                <KA:TSKD14 Grid.Column="1" Name="cSKD14"
                               IsEdit="{Binding IsEdit,ElementName=TV}"
                                    KUNDNR="{Binding KUNDNR,ElementName=TV}" 
                                    KEY="{Binding VKKANSPRECH,ElementName=TV}"  
                                    ORDERNUM="{Binding VKKANSPRECH,ElementName=TV}"  
                                />
                <TextBlock Grid.Column="2" Visibility="Collapsed" Text="{Binding VKKANSPRECH}" ></TextBlock>
            </Grid>
            <Grid Grid.Column="5" Margin="10,0,0,0" Visibility="{Binding IsEdit,Converter={StaticResource ResourceKey= bv}}">
                <VL:TSVL02 SART="{Binding SART,ElementName=TV}"  
                           Name="cVL02"
                           KEY="{Binding VSPED,ElementName=TV}" 
                           ORDERNUM="{Binding VSPED,ElementName=TV}"
                           IsEdit="{Binding IsEdit,ElementName=TV}"/>
            </Grid>
            <Grid Grid.Column="5" Margin="10,0,0,0" 
                      Visibility="{Binding IsEdit,Converter={StaticResource ResourceKey= nbv}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=运输方式:}}"></TextBlock>
                    <TextBlock Grid.Column="1" Text="{Binding VKKVERSART,Source={StaticResource vwMaster},Converter={StaticResource gb2312}}" />
                </Grid>
                <Grid Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=承运人:}}"></TextBlock>
                    <TextBlock Grid.Column="1" Text="{Binding VKKSPED,Source={StaticResource vwMaster},Converter={StaticResource gb2312}}" />
                </Grid>
            </Grid>
            <Grid Grid.Column="0" Margin="5,0,0,0" Visibility="Collapsed" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=状态}}" ></TextBlock>
                <SD:K14SA Grid.Column="2"  
                              EXAUF="{Binding KDSTA,ElementName=TV}" 
                                  />
            </Grid>
            <Grid Grid.Column="8" Visibility="Collapsed" Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <ZA:TSZA02 Grid.Column="1"  Name="cSZ02"
                               IsEdit="True"
                               Visibility="{Binding IsChgZA,ElementName=TV,Converter={StaticResource bv}}"
                               KEY="{Binding ZAHLBED,ElementName=TV}"  
                               ORDERNUM="{Binding ZAHLBED,ElementName=TV}"  
                                   />
            </Grid>

        </Grid>
        <WrapPanel Grid.Row="1" Margin="5,5,0,0">
            <WrapPanel>
                <TextBlock Text="{Binding Source={Localization:Translate Word=总数量:}}"   FontSize="16"></TextBlock>
                <WrapPanel Visibility="{Binding IsKG,ElementName=TV,Converter={StaticResource bv}}">
                    <TextBlock Margin="5,0,0,0" Text="{Binding VKKGESMENGE1}" FontSize="16"  Width="Auto" ></TextBlock>
                </WrapPanel>
                <WrapPanel >
                    <TextBlock Margin="5,0,0,0" Text="{Binding VKKGESMENGE2}" FontSize="16"  Width="Auto" ></TextBlock>
                    <TextBlock Margin="5,0,0,0" Text="{Binding Source={Localization:Translate Word=M}}" FontSize="16" />
                    <TextBlock Margin="10,0,0,0" FontSize="16"  Width="Auto"
                                   Text="{Binding VKKGESMENGE2,Converter={StaticResource M2YD}}"/>
                    <TextBlock Margin="5,0,0,0" Text="{Binding Source={Localization:Translate Word=YD}}" FontSize="16" />
                </WrapPanel>
            </WrapPanel>
            <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=总金额:}}" ></TextBlock>
                <TextBlock Grid.Column="1" Margin="5,0,0,0" Text="{Binding VKKGESWERT}" FontSize="16" Width="Auto" ></TextBlock>
            </Grid>
            <WrapPanel Margin="10,0,0,0">
                <TextBlock FontSize="16"  Text="{Binding Source={Localization:Translate Word=币种:}}"/>
                <TextBlock Grid.Column="1" Margin="5,0,0,0" Text="{Binding VKKHWAEHRSL}" FontSize="16" Width="Auto" ></TextBlock>
                <TextBlock FontSize="16"  Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=汇率:}}"/>
                <ex:NumericBox Grid.Column="1" MaxLength="7" Margin="5,0,0,0"
                                   DecimalPlaces="4"
                                   KeyUp="KURS_KeyUp"
                                   IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                                   Text="{Binding KURS,ElementName=TV,Converter={StaticResource dw}}" Width="80"/>
            </WrapPanel>
            <Grid Margin="10,0,0,0" VerticalAlignment="Top"   Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=付款方式:}}"></TextBlock>
                <ZA:TSZA02 Grid.Column="1" 
                               IsEdit="False"
                               KEY="{Binding ZAHLBED,ElementName=TV}" 
                               ORDERNUM="{Binding ZAHLBED,ElementName=TV}"                                
                               />
            </Grid>
            <TextBlock Text="{Binding Source={Localization:Translate Word=税:}}"  Visibility="Collapsed"></TextBlock>
            <TextBlock Text="{Binding STEUER,ElementName=cKD06}"  Visibility="Collapsed"/>
            <TextBlock Text="{Binding INFO,ElementName=TV}"/>
        </WrapPanel>

        <KV:TKD06 Foreground="Green" IsEnabled="False"
                      Name="cKD06"
                      Visibility="Collapsed"
                      ORDERNUM="{Binding KD06KEY,ElementName=TV}"
                      />
    </Grid>
</B:UIVKKOPF>
